package com.pactera.madp.cp.controller.oms.workroom;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.pactera.madp.common.core.util.R;
import com.pactera.madp.cp.api.entity.WorkRoomEntity;
import com.pactera.madp.cp.api.dto.workroom.WorkContactRoomIndexDto;
import com.pactera.madp.cp.service.IWorkRoomService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description:客户群成员管理-列表
 * @author: Huayu
 * @time: 2020/12/16 8:34
 */

@RestController
@AllArgsConstructor
@RequestMapping("/workcontactroom")
@Api(value = "workcontactroom", tags = "客户群成员管理")
public class WorkContactRoomController {

    private IWorkRoomService workRoomServiceImpl;

    @GetMapping("/page")
    @ApiOperation(value = "客户群成员管理列表")
    public R index(WorkContactRoomIndexDto workContactRoomIndexDto, Page page) {
        Integer workRoomId = workContactRoomIndexDto.getWorkRoomId();
        //查询客户群基本信息
        WorkRoomEntity workRoomEntity = workRoomServiceImpl.getWorkRoom(workRoomId);
        //处理请求参数
        return workRoomServiceImpl.handelWorkContactRoomData(workRoomEntity, workContactRoomIndexDto,page);
    }

}
